﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace TDT_Project.classes
{
    public class cls_dungchung
    {
        public static string nienkhoa_id_load = "";
        public static string nienkhoa_ten_load = "";
        public static string fileURL = "";
        public static string KillChars(string strInput)
        {

            string result = "";
            if (!String.IsNullOrEmpty(strInput))
            {
                string[] arrBadChars = new string[] { "select", "SELECT", "drop", "DROP", ";", "--", "insert", "INSERT", "delete", "DELETE", "xp_", "XP_", "sysobjects", "SYSOBJECTS", "syscolumns", "SYSCOLUMNS", "or", "OR", "'", "1=1", "truncate", "TRUNCATE", "table", "TABLE", "is null", "IS NULL" };
                result = strInput.Trim().Replace("'", "''");
                result = strInput.Replace("%20", " ");
                //result = result.ToLower();
                for (int i = 0; i < arrBadChars.Length; i++)
                {
                    string strBadChar = arrBadChars[i].ToString();
                    result = result.Replace(strBadChar, "");
                }
            }
            return result;
        }


    }
}